import { DialogForm } from 'custom/index'
import Xse from '../components/Xse.vue'
import Jdl from '../components/Jdl.vue'
import ZeroInput from '../components/ZeroInput.vue'
import { postSjlr } from '../api'



const sjlrDialog = new DialogForm('DialogForm')

sjlrDialog
    .width('40%')
    .getApi(async (_, row) => {
        console.log(row);
        return row;
    })
    .postApi(postSjlr)
    .useGroup('数据录入')
    .useDatePicker('date').label('服务日期').setProp('disabled', true).end()
    .useItem('sjzh').label('数据账号').setProp('disabled', true).end()
    .useItem('zzhmc').label('子账号名称').setProp('disabled', true).end()
    .useCustomItem(Xse, 'ljxse').label('销售额(元)').required().end()
    .useCustomItem(Jdl, 'rjjdl').label('接待量(人)').required().end()
    .useItem1('xdzhl').label('转化率(%)').required().end()
    .useItem1('xysj').label('响应时间(秒)').required().end()
    .useItem1('ljdwb').label('累计答问比(%)').required().end()
    .useCustomItem(ZeroInput, 'hfl').label('回复率(%)').required().end()

export { sjlrDialog }